Generally, a frequency envelope of a frame of input signal is obtained by taking square roots of average energy values at all or some of frequencies points.
Currently, a method for quantizing a frequency envelope by a codec usually involves a simple scalar quantization or a simple vector quantization. However, in some special cases, such a method may not be suitable. For example, when many frequency envelopes need to be obtained from one frame and a quantity of bits that can be used to quantize the frequency envelopes is somewhat limited, a scalar quantization of the frequency envelopes may not be suitable because it consumes a large quantity of bits.
An existing vector quantization method includes the following steps: (1) divide frequencies that need to be quantized into several vectors according to dimensions of the vectors; (2) pre-train a codebook with a length of 2B by using a large quantity of vector samples and according to a quantity B of bits for quantizing each of the vectors, that is, this codebook has 2B vectors, and these vectors are trained in advance according to the large quantity of vector samples; (3) compare a vector A that needs to be quantized with each of the vectors in the codebook, and search out a vector B that is closest to the vector A; and (4) a location index of the vector B in the codebook is a quantized value of the vector A.
Therefore, if all frequency envelopes are combined as a vector for vector quantization, a large codebook is required, which increases complexity.
How to design a simple and effective frequency envelope vector quantization method and ensure quantization quality at the same time is an urgent problem to be resolved.